package Review;

public class C extends  A{
    int a;
    char b;
    int c;
    public  void approachA(int a){
        System.out.println("C中的approach的方法");
    }
    public  void approach(){
        a =10;//相当与this.a =a=10;
        b ='a';//相当于this.b =b='a' ;
        c =100;
        //注意 this时引用当前对象


        //而super则是子类调用从父类继承下来的成员变量
        super.a =20;
        super.b =99;
        System.out.println("这是父类的a和b"+super.a+super.b);
        System.out.println("===========");
        System.out.println("这是子类的a和b"+a+b+c);

    }
}
